Repository navigation
feat(ui-message-list): add the message toolbar - #43726
gabriellsh wants to merge 10 commits into
Conversation
|
Looks like this PR is not ready to merge, because of the following issues:
Please fix the issues and try again If you have any trouble, please check the PR guidelines |
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: true
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
🦋 Changeset detectedLatest commit: b743403 The changes in this PR will be included in the next version bump. This PR includes changesets to release 3 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## message-list/04-attachments #43726 +/- ##
===============================================================
+ Coverage 71.41% 71.61% +0.20%
===============================================================
Files 5726 5623 -103
Lines 252065 251728 -337
Branches 47359 47464 +105
===============================================================
+ Hits 180016 180285 +269
+ Misses 67647 67090 -557
+ Partials 4402 4353 -49
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Claude <noreply@anthropic.com>
…parameter The action no longer reads the old list context, so a toolbar outside the old list can offer it. Co-Authored-By: Claude <noreply@anthropic.com>
…t as recent A use of an emoji that is not a pick from the picker can now raise its frequency, which ranks the quick reactions, and leave the recent list as it is. Nothing calls it yet. The picker's own picks keep doing both. Co-Authored-By: Claude <noreply@anthropic.com>
The toolbar, its inline items for each place, the menus and the holder that shows it only where messages allow interaction, taken from the toolbar context and the contexts the package already has. Reply in thread gets a navigation capability of its own, so that the app can keep dropping the URL's search parameters as its toolbar did; the app side of it comes with it so that the app still builds. The toolbar context gets useCountQuickReaction, which the app answers by counting a quick reaction toward the frequent emoji, and its useQuickReactions can say that a place offers no reactions at all, so the app can keep hiding them where no chat is open, as its toolbar did. Plan departures: the package's specs and stories build rooms and subscriptions inline, since the mock-providers fixtures are shared infrastructure this branch does not add; useIsVisible is ui-client's. message-toolbar R1 to R13, R15 to R18, R27, R28 and R23's navigation. Co-Authored-By: Claude <noreply@anthropic.com>
MessagesProvider gives the toolbar the built-in menu entries, gated as before, then the actions of apps, the AI actions and the first three quick reactions of the emoji picker that the app can render. Using a quick reaction raises the emoji's frequency in the picker and leaves the recent list alone. Where no chat is open it offers no reactions at all, as the app's toolbar did. openReactionPicker now tells that it closed also when it could not open, so a toolbar is never held open for a picker that is not there. This is the proof message-capabilities R28 deferred for pin, star, mark unread and translate, and the spec now promises it. message-toolbar R19 to R24. Co-Authored-By: Claude <noreply@anthropic.com>
The room's and the thread's message render the package's toolbar holder, which shows nothing where messages do not allow interaction. Two changes a user can see, both stated by message-toolbar and each with its changeset: the "More" menu shows when only apps offer an action (R14), and a quick reaction no longer adds to the recently used emoji, while it still counts toward the frequent ones (R21). message-toolbar R25 and R26. Co-Authored-By: Claude <noreply@anthropic.com>
The spec of the deleted reaction item goes with it: the package's toolbar spec and MessagesProvider's specs prove its cases, hiding the reactions where no chat is open among them (message-toolbar R6 and R21). The one case they do not keep is that a quick reaction was added to the recent emoji list, which it no longer is (message-toolbar R21). Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Claude <noreply@anthropic.com>
55322f8 to
b743403
Compare
Proposed changes (including videos or screenshots)
Adds the message toolbar to
@rocket.chat/ui-message-list: the inline actions (reaction with quick reactions, quote, reply in thread, forward, jump), the action menu, the AI menu, the item sets for the eleven contexts, and the visibility rule that keeps the toolbar shown while its menu or the emoji picker is open.MessagesProvidergains the toolbar value, which runs the app's menu action hooks and appends the apps' actions. The app'scomponents/message/toolbar/**is deleted.@rocket.chat/ui-emoji-pickergainsaddFrequentEmoji, so a quick reaction can count toward the frequent emoji without being added to the recent list (the package is private, no changeset). A refactor below the feature makes the read receipts action take its settings as a parameter.Where no chat is open, the provider says the place offers no reactions (
useQuickReactionsreturnsundefined), so the toolbar shows no reaction item there, asdevelop's toolbar showed none. The specsdevelopadded in #43386 for the reaction action are merged into the package's and the provider's specs.This is part 05 of the stack (00 to 09). Review it against its base branch
message-list/04-attachments, not againstdevelop.Stack
Visible changes
.changeset/message-toolbar-menu-with-only-app-actions.md,'@rocket.chat/meteor': minor: the "More" menu shows when it holds only actions added by apps; before, it was hidden when no built-in action applied..changeset/message-toolbar-quick-reactions-not-recent.md,'@rocket.chat/meteor': minor: a reaction picked from the quick reactions is no longer added to the recently used emoji; it still counts toward the frequently used emoji that choose the quick reactions, and the emoji picker still does both.Known differences from develop
Besides the two above:
developtakes it after (a keyboard-only edge case).Issue(s)
Steps to test or reproduce
Hover a message in each of: a room, a thread, a DM, the pinned, starred and mentions tabs, search results, and a federated room if available. Compare the inline items and the menu with
develop.Further comments
Decisions to check
useCountQuickReactionreads the emoji picker context inside each reaction action, so every on-screen toolbar's reaction action re-renders on each picker preview and frequency change.developdid the same, and the spec's "nothing below renders again" is not accurate for it.develop.develop's quote action and toolbar holder also show nothing without a chat; the package's quote action and holder do not check for a chat, and this PR leaves them so.@rocket.chat/ui-message-list. This PR adds none for the private package (nor for the private@rocket.chat/ui-emoji-picker); parts 08 and 09 of the stack add some for@rocket.chat/ui-message-list. The repo versions private packages (other private packages carry changesets), so 08 and 09 follow the repo, and 03 to 07 may need changesets too. Undecided.Not run
message-mobileandsearchand the read-only and muted gates on menu entries are not exercised by specs of their own.🤖 Generated with Claude Code